﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Design;
using GameStateManagement.GameHelper;

namespace _0812367_0912581
{
    public class PlayerBullet: Bullet
    {
         public PlayerBullet(Texture2D aImage, Point aSheetsize, Vector2 thePosition, int theColOffset, float scale, int timePerFrame, Vector2 theSpeed, bool theVisible)
            : base(aImage, aSheetsize, thePosition, theColOffset, scale, timePerFrame, theSpeed, theVisible)
        {
        }

        public PlayerBullet(Bullet aBullet)
            : base(aBullet)
        {
        }


        public override void UpdatePosition(GameTime gameTime)
        {
            this.Position += this.Speed;
            
        }

        public override void UpdateVisible(GameTime gameTime)
        {
            //base.UpdateVisible();
            if (this.Position.X > GameSettings.Instance.ScreenManager.Game.Window.ClientBounds.Width - 100)//Cho ban ko het man hinh
                Visible = false;              
        }
    }
}
